home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / gcc / gcc258s.zoo / configure < prev    next >
Encoding:
Text File  |  1993-11-22  |  43.7 KB  |  1,921 lines

  1. #!/bin/sh
  2. # Configuration script for GNU CC
  3. #   Copyright (C) 1988, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
  4.  
  5. #This file is part of GNU CC.
  6.  
  7. #GNU CC is free software; you can redistribute it and/or modify
  8. #it under the terms of the GNU General Public License as published by
  9. #the Free Software Foundation; either version 2, or (at your option)
  10. #any later version.
  11.  
  12. #GNU CC is distributed in the hope that it will be useful,
  13. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. #GNU General Public License for more details.
  16.  
  17. #You should have received a copy of the GNU General Public License
  18. #along with GNU CC; see the file COPYING.  If not, write to
  19. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. #
  22. # Shell script to create proper links to machine-dependent files in
  23. # preparation for compiling gcc.
  24. #
  25. # Options: --srcdir=DIR        specifies directory where sources are.
  26. #        --host=HOST        specifies host configuration.
  27. #       --target=TARGET    specifies target configuration.
  28. #       --build=TARGET    specifies configuration of machine you are
  29. #                using to compile GCC.
  30. #       --prefix=DIR        specifies directory to install in.
  31. #       --local-prefix=DIR    specifies directory to put local ./include in.
  32. #       --exec-prefix=DIR    specifies directory to install executables in.
  33. #       --with-gnu-ld    arrange to work with GNU ld.
  34. #       --with-gnu-as    arrange to work with GAS.
  35. #       --with-stabs        arrange to use stabs instead of host debug format.
  36. #       --with-elf        arrange to use elf instead of host debug format.
  37. #       --nfp        assume system has no FPU.
  38. #
  39. # If configure succeeds, it leaves its status in config.status.
  40. # If configure fails after disturbing the status quo, 
  41. #     config.status is removed.
  42. #
  43.  
  44. progname=$0
  45.  
  46. # Default --srcdir to the directory where the script is found, 
  47. # if a directory was specified.
  48. # The second sed call is to convert `.//configure' to `./configure'.
  49. srcdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
  50. if [ x$srcdir = x$0 ]
  51. then
  52. srcdir=
  53. fi
  54.  
  55. host=
  56.  
  57. # Default prefix to /usr/local.
  58. prefix=/usr/local
  59.  
  60. # local_prefix specifies where to find the directory /usr/local/include
  61. # We don't use $(prefix) for this
  62. # because we always want GCC to search /usr/local/include
  63. # even if GCC is installed somewhere other than /usr/local.
  64. # Think THREE TIMES before specifying any other value for this!
  65. # DO NOT make this use $prefix!
  66. local_prefix=/usr/local
  67. # Default is to let the Makefile set exec_prefix from $(prefix)
  68. exec_prefix='$(prefix)'
  69.  
  70. remove=rm
  71. hard_link=ln
  72. symbolic_link='ln -s'
  73. copy=cp
  74.  
  75. # Record all the arguments, to write them in config.status.
  76. arguments=$*
  77.  
  78. #for Test
  79. #remove="echo rm"
  80. #hard_link="echo ln"
  81. #symbolic_link="echo ln -s"
  82.  
  83. target=
  84. host=
  85. build=
  86.  
  87. for arg in $*;
  88. do
  89.   case $next_arg in
  90.   --srcdir)
  91.     srcdir=$arg
  92.     next_arg=
  93.     ;;
  94.   --host)
  95.     host=$arg
  96.     next_arg=
  97.     ;;
  98.   --target)
  99.     target=$arg
  100.     next_arg=
  101.     ;;
  102.   --build)
  103.     build=$arg
  104.     next_arg=
  105.     ;;
  106.   --prefix)
  107.     prefix=$arg
  108.     next_arg=
  109.     ;;
  110.   --local-prefix)
  111.     local_prefix=$arg
  112.     next_arg=
  113.     ;;
  114.   --exec-prefix)
  115.     exec_prefix=$arg
  116.     next_arg=
  117.     ;;
  118.   *)
  119.     case $arg in
  120.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  121.     next_arg=--srcdir
  122.     ;;
  123.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  124.     srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`
  125.     ;;
  126.      -host | --host | --hos | --ho | --h)
  127.     next_arg=--host
  128.     ;;
  129.      -host=* | --host=* | --hos=* | --ho=* | --h=*)
  130.     host=`echo $arg | sed 's/-*h[a-z]*=//'`
  131.     ;; 
  132.      -target | --target | --targe | --targ | --tar | --ta | --t)
  133.     next_arg=--target
  134.     ;;
  135.      -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  136.     target=`echo $arg | sed 's/-*t[a-z]*=//'`
  137.     ;; 
  138.      -build | --build | --buil | --bui | --bu | --b)
  139.     next_arg=--build
  140.     ;;
  141.      -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  142.     build=`echo $arg | sed 's/-*b[a-z]*=//'`
  143.     ;; 
  144.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  145.     next_arg=--prefix
  146.     ;;
  147.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  148.     prefix=`echo $arg | sed 's/-*p[a-z]*=//'`
  149.     ;;
  150.      -local-prefix | --local-prefix | --local-prefi | --local-pref | --local-pre \
  151.     | --local-pr | --local-p | --local- | --local | --loc | --lo | --l)
  152.     next_arg=--local-prefix
  153.     ;;
  154.      -local-prefix=* | --local-prefix=* | --local-prefi=* | --local-pref=* \
  155.     | --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
  156.     | --loc=* | --lo=* | --l=*)
  157.     local_prefix=`echo $arg | sed 's/-*l[-a-z]*=//'`
  158.     ;;
  159.      -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
  160.     | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  161.     next_arg=--exec-prefix
  162.     ;;
  163.      -exec-prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* \
  164.     | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
  165.     | --exe=* | --ex=* | --e=*)
  166.     exec_prefix=`echo $arg | sed 's/-*e[-a-z]*=//'`
  167.     ;;
  168.      -with-gnu-ld | --with-gnu-ld | --with-gnu-l)
  169.     gnu_ld=yes
  170.     ;;
  171.      -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a)
  172.         gas=yes
  173.     ;;
  174.      -nfp | --nfp | --nf | --n)
  175.     nfp=yes
  176.     ;;
  177.      -with-stabs | -with-stab | -with-sta | -with-st | -with-s \
  178.     | --with-stabs | --with-stab | --with-sta | --with-st | --with-s \
  179.     | -stabs | -stab | -sta | -st  \
  180.     | --stabs | --stab | --sta | --st)
  181.     stabs=yes
  182.     ;;
  183.      -with-elf | -with-el | -with-se \
  184.     | --with-elf | --with-el | --with-e \
  185.     | -elf | -el | -e \
  186.     |--elf | --el | --e)
  187.     elf=yes
  188.     ;;
  189.      -with-* | --with-*) ;; #ignored
  190.      -enable-* | --enable-*) ;; #ignored
  191.      -x | --x) ;; # ignored
  192.      --verbose) ;; # ignored for now
  193.      -*)
  194.     echo "Invalid option \`$arg'" 1>&2
  195.     exit 1
  196.     ;;
  197.      *)
  198. # Allow configure HOST TARGET
  199.     if [ x$host = x ]
  200.     then
  201.         host=$target
  202.     fi
  203.     target=$arg
  204.     ;;
  205.     esac
  206.   esac
  207. done
  208.  
  209. # Find the source files, if location was not specified.
  210. if [ x$srcdir = x ]
  211. then
  212.     srcdirdefaulted=1
  213.     srcdir=.
  214.     if [ ! -r tree.c ]
  215.     then
  216.         srcdir=..
  217.     fi
  218. fi
  219.  
  220. if [ ! -r ${srcdir}/tree.c ]
  221. then
  222.     if [ x$srcdirdefaulted = x ]
  223.     then
  224.       echo "$progname: Can't find compiler sources in \`${srcdir}'" 1>&2
  225.     else
  226.       echo "$progname: Can't find compiler sources in \`.' or \`..'" 1>&2
  227.     fi
  228.     exit 1
  229. fi
  230.  
  231. if [ -r ${srcdir}/config.status ] && [ x$srcdir != x. ]
  232. then
  233.     echo "$progname: \`configure' has been run in \`${srcdir}'" 1>&2
  234.     exit 1
  235. fi
  236.  
  237. # Complain if an arg is missing
  238. if [ x$target = x ]
  239. then
  240.     # This way of testing the result of a command substitution is
  241.     # defined by Posix.2 (section 3.9.1) as well as traditional shells.
  242.     if target=`${srcdir}/config.guess` ; then
  243.         echo "Configuring for a ${target} host." 1>&2
  244.     else
  245.         echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
  246.         echo "\
  247. Usage: `basename $progname` [--host=HOST] [--build=BUILD]
  248.        [--prefix=DIR] [--local-pref=DIR] [--exec-pref=DIR]
  249.        [--with-gnu-as] [--with-gnu-ld] [--with-stabs] [--with-elf] [--nfp] TARGET" 1>&2
  250.     echo "Where HOST, TARGET and BUILD are three-part configuration names " 1>&2
  251.         if [ -r config.status ]
  252.         then
  253.             tail +2 config.status 1>&2
  254.         fi
  255.         exit 1
  256.     fi
  257. fi
  258.  
  259. # Default other arg
  260. if [ x$host = x ]
  261. then
  262.     host=$target
  263. fi
  264. # If $build was not specified, use $host.
  265. if [ x$build = x ]
  266. then
  267.     build=$host
  268. fi
  269.  
  270. build_xm_file=
  271. host_xm_file=
  272. host_xmake_file=
  273. host_broken_install=
  274. host_install_headers_dir=install-headers-tar
  275. host_truncate_target=
  276.  
  277. # Validate the specs, and canonicalize them.
  278. canon_build=`/bin/sh $srcdir/config.sub $build` || exit 1
  279. canon_host=`/bin/sh $srcdir/config.sub $host` || exit 1
  280. canon_target=`/bin/sh $srcdir/config.sub $target` || exit 1
  281.  
  282. # Decode the host machine, then the target machine.
  283. # For the host machine, we save the xm_file variable as host_xm_file;
  284. # then we decode the target machine and forget everything else
  285. # that came from the host machine.
  286. for machine in $canon_build $canon_host $canon_target; do
  287.  
  288.     cpu_type=
  289.     xm_file=
  290.     tm_file=
  291.     out_file=
  292.     xmake_file=
  293.     tmake_file=
  294.     header_files=
  295.     extra_passes=
  296.     # Set this to force installation and use of collect2.
  297.     use_collect2=
  298.     # Set this to override the default target model.
  299.     target_cpu_default=
  300.     # Set this to force use of install.sh.
  301.     broken_install=
  302.     # Set this to control which fixincludes program to use.
  303.     fixincludes=fixincludes
  304.     # Set this to control how the header file directory is installed.
  305.     install_headers_dir=install-headers-tar
  306.     # Set this to a non-empty list of args to pass to cpp if the target
  307.     # wants its .md file passed through cpp.
  308.     cpp_md_flags=
  309.     # Set this if directory names should be truncated to 14 characters.
  310.     truncate_target=
  311.  
  312.     case $machine in
  313.     # Support site-specific machine types.
  314.     *local*)
  315.         cpu_type=`echo $machine | sed -e 's/-.*//'`
  316.         rest=`echo $machine | sed -e "s/$cpu_type-//"`
  317.         xm_file=${cpu_type}/xm-$rest.h
  318.         tm_file=${cpu_type}/$rest.h
  319.         if [ -f $srcdir/config/${cpu_type}/x-$rest ] ; \
  320.         then xmake_file=${cpu_type}/x-$rest; \
  321.         else true; \
  322.         fi
  323.         if [ -f $srcdir/config/${cpu_type}/t-$rest ] ; \
  324.         then tmake_file=${cpu_type}/t-$rest; \
  325.         else true; \
  326.         fi
  327.         ;;
  328.     vax-*-bsd*)            # vaxen running BSD
  329.         use_collect2=yes
  330.         ;;
  331.     vax-*-ultrix*)            # vaxen running ultrix
  332.         tm_file=vax/ultrix.h
  333.         use_collect2=yes
  334.         ;;
  335.     vax-*-vms*)            # vaxen running VMS
  336.         xm_file=vax/xm-vms.h
  337.         tm_file=vax/vms.h
  338.         ;;
  339.     vax-*-sysv*)            # vaxen running system V
  340.         xm_file=vax/xm-vaxv.h
  341.         tm_file=vax/vaxv.h
  342.         ;;
  343. # This hasn't been upgraded to GCC 2.
  344. #    tahoe-harris-*)            # Harris tahoe, using COFF.
  345. #        tm_file=tahoe/harris.h
  346. #        ;;
  347. #    tahoe-*-bsd*)            # tahoe running BSD
  348. #        ;;
  349.     i370-*-mvs*)
  350.         cpu_type=i370
  351.         tm_file=i370/mvs.h
  352.         xm_file=i370/xm-mvs.h
  353.         out_file=i370/mvs370.c
  354.         ;;
  355.     i[34]86-*-osfrose*)        # 386 using OSF/rose
  356. # The following line (and similar below) is not redundant since this can
  357. # be used for i486 or i386.
  358.         cpu_type=i386
  359.                 if [ x$elf = xyes ]
  360.         then
  361.             tm_file=i386/osfelf.h
  362.             use_collect2=
  363.         else
  364.             tm_file=i386/osfrose.h
  365.             use_collect2=yes
  366.         fi
  367.         xmake_file=i386/x-osfrose
  368.         tmake_file=i386/t-osfrose
  369.         ;;
  370.     i[34]86-sequent-bsd*)         # 80386 from Sequent
  371.         cpu_type=i386
  372.         use_collect2=yes
  373.         if [ x$gas = xyes ]
  374.         then
  375.             tm_file=i386/seq-gas.h
  376.         else
  377.             tm_file=i386/sequent.h
  378.         fi
  379.         ;;
  380.     i[34]86-next-*)
  381.         cpu_type=i386
  382.         tm_file=i386/next.h
  383.         out_file=i386/next.c
  384.         xm_file=i386/xm-next.h
  385.         tmake_file=i386/t-next
  386.         xmake_file=i386/x-next
  387.         ;;
  388.     i[34]86-*-bsd*)
  389.         cpu_type=i386
  390.         tm_file=i386/386bsd.h
  391. #        tmake_file=t-libc-ok
  392. # Next line turned off because both 386BSD and BSD/386 use GNU ld.
  393. #        use_collect2=yes
  394.         ;;
  395.     i[34]86-*-mach*)
  396.         cpu_type=i386
  397.         tm_file=i386/mach.h
  398. #        tmake_file=t-libc-ok
  399.         use_collect2=yes
  400.         ;;
  401.     i[34]86-*-sco3.2v4*)         # 80386 running SCO 3.2v4 system
  402.         cpu_type=i386
  403.         xm_file=i386/xm-sco.h
  404.         xmake_file=i386/x-sco4
  405.         fixincludes=fixinc.sco
  406.         broken_install=yes
  407.         install_headers_dir=install-headers-cpio
  408.                 if [ x$stabs = xyes ]
  409.         then
  410.             tm_file=i386/sco4dbx.h
  411.             tmake_file=i386/t-svr3dbx
  412.         else
  413.             tm_file=i386/sco4.h
  414.             tmake_file=i386/t-sco
  415.         fi
  416.         ;;
  417.     i[34]86-*-sco*)             # 80386 running SCO system
  418.         cpu_type=i386
  419.         xm_file=i386/xm-sco.h
  420.         xmake_file=i386/x-sco
  421.         broken_install=yes
  422.         install_headers_dir=install-headers-cpio
  423.                 if [ x$stabs = xyes ]
  424.         then
  425.             tm_file=i386/scodbx.h
  426.             tmake_file=i386/t-svr3dbx
  427.         else
  428.             tm_file=i386/sco.h
  429.             tmake_file=i386/t-sco
  430.         fi
  431.         truncate_target=yes
  432.         ;;
  433.     i[34]86-*-isc*)            # 80386 running ISC system
  434.         cpu_type=i386
  435.         xm_file=i386/xm-isc.h
  436.         case $machine in
  437.           i[34]86-*-isc3*)
  438.             xmake_file=i386/x-isc3
  439.             ;;
  440.           *)
  441.             xmake_file=i386/x-isc
  442.             ;;
  443.         esac
  444.         echo $xmake_file
  445.                 if [ x$gas = xyes ]
  446.         then
  447.             if [ x$stabs = xyes ]
  448.             then
  449.                 tm_file=i386/iscdbx.h
  450.                 tmake_file=i386/t-svr3dbx
  451.             else
  452.                 # iscgas.h, a nonexistent file, was used here.
  453.                 tm_file=i386/isccoff.h
  454.                 tmake_file=i386/t-isc
  455.             fi
  456.         else
  457.             tm_file=i386/isccoff.h
  458.             tmake_file=i386/t-isc
  459.         fi
  460.         install_headers_dir=install-headers-cpio
  461.         broken_install=yes
  462.         ;;
  463.     i[34]86-ibm-aix*)        # IBM PS/2 running AIX
  464.         cpu_type=i386
  465.                 if [ x$gas = xyes ]
  466.         then
  467.             tm_file=i386/aix386.h
  468.             tmake_file=i386/t-aix
  469.         else
  470.             tm_file=i386/aix386ng.h
  471.             use_collect2=yes
  472.         fi
  473.         xm_file=i386/xm-aix.h
  474.         xmake_file=i386/x-aix
  475.         broken_install=yes
  476.         fixincludes=fixinc.ps2
  477.         ;;
  478.     i386-sun-sunos*)        # Sun i386 roadrunner
  479.         xm_file=i386/xm-sun.h
  480.         tm_file=i386/sun.h
  481.         use_collect2=yes
  482.         ;;
  483.     i[34]86-*-linux*)               # Intel 80386's running Linux
  484.         cpu_type=i386
  485.         xm_file=i386/xm-linux.h
  486.         xmake_file=i386/x-linux
  487.                 if [ x$elf = xyes ]
  488.         then
  489.             tm_file=i386/linuxelf.h
  490.         else
  491.             tm_file=i386/linux.h
  492.         fi
  493.         fixincludes=Makefile.in #On Linux, the headers are ok already.
  494.         broken_install=yes
  495.         ;;
  496.     i486-ncr-sysv4*)        # NCR 3000 - i486 running system V.4
  497.         cpu_type=i386
  498.         xm_file=i386/xm-sysv4.h
  499.         xmake_file=i386/x-ncr3000
  500.         tm_file=i386/sysv4.h
  501.         tmake_file=t-svr4
  502.         ;;
  503.     i[34]86-*-sysv4*)        # Intel 80386's running system V.4
  504.         cpu_type=i386
  505.         xm_file=i386/xm-sysv4.h
  506.         tm_file=i386/sysv4.h
  507.         tmake_file=t-svr4
  508.         xmake_file=x-svr4
  509.         ;;
  510.     i[34]86-sequent-sysv*)        # Sequent 80386's running system V
  511.         cpu_type=i386
  512.         xm_file=i386/xm-sysv3.h
  513.         xmake_file=i386/x-sysv3
  514.         tm_file=i386/seq-sysv3.h
  515.         tmake_file=t-svr3
  516.         fixincludes=fixinc.svr4
  517.         broken_install=yes
  518.         ;;
  519.     i[34]86-*-sysv*)        # Intel 80386's running system V
  520.         cpu_type=i386
  521.         xm_file=i386/xm-sysv3.h
  522.         xmake_file=i386/x-sysv3
  523.         if [ x$gas = xyes ]
  524.         then
  525.             if [ x$stabs = xyes ]
  526.             then
  527.                 tm_file=i386/svr3dbx.h
  528.                 tmake_file=i386/t-svr3dbx
  529.             else
  530.                 tm_file=i386/svr3gas.h
  531.                 tmake_file=t-svr3
  532.             fi
  533.         else
  534.             tm_file=i386/sysv3.h
  535.             tmake_file=t-svr3
  536.         fi
  537.         ;;
  538.     i[34]86-*-solaris2* | i[34]86-*-sunos5*)
  539.         cpu_type=i386
  540.         xm_file=i386/xm-sysv4.h
  541.         tm_file=i386/sol2.h
  542.         tmake_file=i386/t-sol2
  543.         xmake_file=x-svr4
  544.         fixincludes=fixinc.svr4
  545.         broken_install=yes
  546.         ;;
  547.     i[34]86-*-lynxos)
  548.         cpu_type=i386
  549.         tm_file=i386/lynx.h
  550.         xm_file=xm-lynx.h
  551.         xmake_file=x-lynx
  552.         # ??? Due to bugs in /bin/sh, it is too much trouble to get
  553.         # the fixincludes script to run correctly, so just don't do it.
  554.         # There are only a very few very minor things that need fixing
  555.         # anyways.  Also, a number of headers files do not have final
  556.         # newlines, which causes them to be incorrectly editted by sed.
  557.         fixincludes=Makefile.in
  558.         ;;
  559.     i860-*-osf*)            # Intel Paragon XP/S, OSF/1AD
  560.         xm_file=i860/xm-paragon.h
  561.         tm_file=i860/paragon.h
  562.         tmake_file=t-osf
  563.         broken_install=yes
  564.         ;;
  565.     i860-*-mach*)
  566.         xm_file=i860/xm-i860.h
  567.         tm_file=i860/mach.h
  568.         tmake_file=t-libc-ok
  569.         ;;
  570.     i860-*-sysv3*)
  571.         xm_file=i860/xm-sysv3.h
  572.         xmake_file=i860/x-sysv3
  573.         tm_file=i860/sysv3.h
  574.         tmake_file=t-svr3
  575.         ;;
  576.     i860-*-sysv4*)
  577.         xm_file=i860/xm-sysv4.h
  578.         xmake_file=i860/x-sysv4
  579.         tm_file=i860/sysv4.h
  580.         tmake_file=t-svr4
  581.         ;;
  582.     i860-alliant-*)        # Alliant FX/2800
  583.         xm_file=i860/xm-fx2800.h
  584.         xmake_file=i860/x-fx2800
  585.         tm_file=i860/fx2800.h
  586.         tmake_file=i860/t-fx2800
  587.         ;;
  588.     i860-*-bsd*)
  589.         if [ x$gas = xyes ]
  590.         then
  591.             tm_file=i860/bsd-gas.h
  592.         else
  593.             tm_file=i860/bsd.h
  594.         fi
  595.         use_collect2=yes
  596.         ;;
  597.     elxsi-elxsi-*)
  598.         use_collect2=yes
  599.         ;;
  600.     sparc-tti-*)
  601.         tm_file=sparc/pbd.h
  602.         xm_file=sparc/xm-pbd.h
  603.         ;;
  604.     sparc-*-sunos4*)
  605.         tm_file=sparc/sparc.h
  606.         use_collect2=yes
  607.         ;;
  608.     sparc-*-sunos3*)
  609.         tm_file=sparc/sun4o3.h
  610.         use_collect2=yes
  611.         ;;
  612.     sparc-*-bsd*)
  613.         tm_file=sparc/bsd.h
  614.         ;;
  615.     sparc-*-sysv4*)
  616.         xm_file=sparc/xm-sysv4.h
  617.         tm_file=sparc/sysv4.h
  618.         tmake_file=t-svr4
  619.         xmake_file=sparc/x-sysv4
  620.         ;;
  621.     sparc-*-solaris2* | sparc-*-sunos5*)
  622.         xm_file=sparc/xm-sol2.h
  623.         tm_file=sparc/sol2.h
  624.         tmake_file=sparc/t-sol2
  625.         xmake_file=sparc/x-sysv4
  626.         fixincludes=fixinc.svr4
  627.         broken_install=yes
  628.         ;;
  629.     sparc-*-lynxos)
  630.         tm_file=sparc/lynx.h
  631.         xm_file=xm-lynx.h
  632.         xmake_file=x-lynx
  633.         # ??? Due to bugs in /bin/sh, it is too much trouble to get
  634.         # the fixincludes script to run correctly, so just don't do it.
  635.         # There are only a very few very minor things that need fixing
  636.         # anyways.  Also, a number of headers files do not have final
  637.         # newlines, which causes them to be incorrectly editted by sed.
  638.         fixincludes=Makefile.in
  639.         ;;
  640.     sparclite-*-*)
  641.         cpu_type=sparc
  642.         tm_file=sparc/lite.h
  643.         use_collect2=yes
  644.         ;;
  645.     m68k-cbm-sysv4*)        # Commodore variant of V.4.
  646.         tm_file=m68k/amix.h
  647.         xm_file=m68k/xm-amix.h
  648.         xmake_file=m68k/x-amix
  649.         tmake_file=t-svr4
  650.         header_files=math-68881.h
  651.         ;;
  652.     m68k-*-sysv4*)            # Motorola m68k's running system V.4
  653.         tm_file=m68k/m68kv4.h
  654.         xm_file=m68k/xm-m68kv.h
  655.         tmake_file=t-svr4
  656.         header_files=math-68881.h
  657.         ;;
  658.     m68k-bull-sysv*)        # Bull DPX/2
  659.         if [ x$gas = xyes ]
  660.         then
  661.             if [ x$stabs = xyes ]
  662.             then
  663.                 tm_file=m68k/dpx2cdbx.h
  664.             else
  665.                 tm_file=m68k/dpx2g.h
  666.             fi
  667.         else
  668.             tm_file=m68k/dpx2.h
  669.         fi
  670.         xm_file=m68k/xm-m68kv.h
  671.         xmake_file=m68k/x-dpx2
  672.         use_collect2=yes
  673.         header_files=math-68881.h
  674.         ;;
  675.     m68k-next-*)
  676.         tm_file=m68k/next.h
  677.         out_file=m68k/next.c
  678.         xm_file=m68k/xm-next.h
  679.         tmake_file=m68k/t-next
  680.         xmake_file=m68k/x-next
  681.         header_files=math-68881.h
  682.         ;;
  683.     m68k-sun-sunos3*)
  684.         if [ x$nfp = xyes ]
  685.         then
  686.             tm_file=m68k/sun3n3.h
  687.         else
  688.             tm_file=m68k/sun3o3.h
  689.         fi
  690.         use_collect2=yes
  691.         header_files=math-68881.h
  692.         ;;
  693.     m68k-sun-sunos*)        # For SunOS 4 (the default).
  694.         if [ x$nfp = xyes ]
  695.         then
  696.             tm_file=m68k/sun3n.h
  697.         else
  698.             tm_file=m68k/sun3.h
  699.         fi
  700.         use_collect2=yes
  701.         header_files=math-68881.h
  702.         ;;
  703.     m68k-sun-mach*)
  704.         tm_file=m68k/sun3mach.h
  705.         use_collect2=yes
  706.         header_files=math-68881.h
  707.         ;;
  708.     m68k-tti-*)
  709.         tm_file=m68k/pbb.h
  710.         xm_file=m68k/xm-m68kv.h
  711.         header_files=math-68881.h
  712.         ;;
  713.     m68k-hp-hpux7*)    # HP 9000 series 300 running HPUX version 7.
  714.         xm_file=m68k/xm-hp320.h
  715.         if [ x$gas = xyes ]
  716.         then
  717.             xmake_file=m68k/x-hp320g
  718.             tmake_file=m68k/t-hp320g
  719.             tm_file=m68k/hp320g.h
  720.         else
  721.             xmake_file=m68k/x-hp320
  722.             tm_file=m68k/hpux7.h
  723.         fi
  724.         broken_install=yes
  725.         install_headers_dir=install-headers-cpio
  726.         use_collect2=yes
  727.         header_files=math-68881.h
  728.         ;;
  729.     m68k-hp-hpux*)    # HP 9000 series 300
  730.         xm_file=m68k/xm-hp320.h
  731.         if [ x$gas = xyes ]
  732.         then
  733.             xmake_file=m68k/x-hp320g
  734.             tmake_file=m68k/t-hp320g
  735.             tm_file=m68k/hp320g.h
  736.         else
  737.             xmake_file=m68k/x-hp320
  738.             tm_file=m68k/hp320.h
  739.         fi
  740.         broken_install=yes
  741.         install_headers_dir=install-headers-cpio
  742.         use_collect2=yes
  743.         header_files=math-68881.h
  744.         ;;
  745.     m68k-hp-bsd4.4*)        # HP 9000/3xx running 4.4bsd
  746.         tm_file=m68k/hp3bsd44.h
  747.         xmake_file=m68k/x-hp3bsd44
  748.         use_collect2=yes
  749.         header_files=math-68881.h
  750.         ;;
  751.     m68k-hp-bsd*)            # HP 9000/3xx running Berkeley Unix
  752.         tm_file=m68k/hp3bsd.h
  753.         use_collect2=yes
  754.         header_files=math-68881.h
  755.         ;;
  756.     m68k-isi-bsd*)
  757.         if [ x$nfp = xyes ]
  758.         then
  759.             tm_file=m68k/isi-nfp.h
  760.         else
  761.             tm_file=m68k/isi.h
  762.         fi
  763.         use_collect2=yes
  764.         header_files=math-68881.h
  765.         ;;
  766.     m68k-sony-newsos3*)
  767.         if [ x$gas = xyes ]
  768.         then
  769.             tm_file=m68k/news3gas.h
  770.         else
  771.             tm_file=m68k/news3.h
  772.         fi
  773.         use_collect2=yes
  774.         header_files=math-68881.h
  775.         ;;
  776.     m68k-sony-bsd* | m68k-sony-newsos*)
  777.         if [ x$gas = xyes ]
  778.         then
  779.             tm_file=m68k/newsgas.h
  780.         else
  781.             tm_file=m68k/news.h
  782.         fi
  783.         use_collect2=yes
  784.         header_files=math-68881.h
  785.         ;;
  786.     m68k-altos-sysv*)           # Altos 3068
  787.         if [ x$gas = xyes ]
  788.         then
  789.                 xm_file=m68k/xm-altos3068.h
  790.                 tm_file=m68k/altos3068.h
  791.         else
  792.             echo "The Altos is supported only with the GNU assembler" 1>&2
  793.             exit 1
  794.         fi
  795.         header_files=math-68881.h
  796.             ;;
  797.     m68k-motorola-sysv*)
  798.         tm_file=m68k/mot3300.h
  799.         xm_file=m68k/xm-mot3300.h
  800.         xmake_file=m68k/x-alloca-c
  801.         use_collect2=yes
  802.         header_files=math-68881.h
  803.         ;;
  804.     m68k-crds-unos*)
  805.         xm_file=m68k/xm-crds.h
  806.         xmake_file=m68k/x-crds
  807.         tm_file=m68k/crds.h
  808.         broken_install=yes
  809.         use_collect2=yes
  810.         header_files=math-68881.h
  811.         ;;
  812.     m68k-apollo-*)
  813.         xmake_file=m68k/x-apollo68
  814.         tm_file=m68k/apollo68.h
  815.         use_collect2=yes
  816.         header_files=math-68881.h
  817.         ;;
  818.         m68k-plexus-sysv*)
  819.         tm_file=m68k/plexus.h
  820.         xm_file=m68k/xm-plexus.h
  821.         use_collect2=yes
  822.         header_files=math-68881.h
  823.         ;;
  824.     m68k-ncr-sysv*)            # NCR Tower 32 SVR3
  825.         tm_file=m68k/tower-as.h
  826.         xm_file=m68k/xm-tower.h
  827.         xmake_file=m68k/x-tower
  828.         tmake_file=t-svr3
  829.         header_files=math-68881.h
  830.         ;;
  831.     m68k-*-sysv3*)            # Motorola m68k's running system V.3
  832.         xm_file=m68k/xm-m68kv.h
  833.         xmake_file=m68k/x-m68kv
  834.         tmake_file=t-svr3
  835.         header_files=math-68881.h
  836.         ;;
  837.     m68000-sun-sunos3*)
  838.         cpu_type=m68k
  839.         tm_file=m68k/sun2.h
  840.         use_collect2=yes
  841.         header_files=math-68881.h
  842.         ;;
  843.     m68000-sun-sunos4*)
  844.         cpu_type=m68k
  845.         tm_file=m68k/sun2o4.h
  846.         use_collect2=yes
  847.         header_files=math-68881.h
  848.         ;;
  849.     m68000-hp-hpux*)        # HP 9000 series 300
  850.         cpu_type=m68k
  851.         xm_file=m68k/xm-hp320.h
  852.         if [ x$gas = xyes ]
  853.         then
  854.             xmake_file=m68k/x-hp320g
  855.             tm_file=m68k/hp310g.h
  856.         else
  857.             xmake_file=m68k/x-hp320
  858.             tm_file=m68k/hp310.h
  859.         fi
  860.         broken_install=yes
  861.         install_headers_dir=install-headers-cpio
  862.         use_collect2=yes
  863.         header_files=math-68881.h
  864.         ;;
  865.     m68000-hp-bsd*)            # HP 9000/200 running BSD
  866.         cpu_type=m68k
  867.         tm_file=m68k/hp2bsd.h
  868.         xmake_file=m68k/x-hp2bsd
  869.         use_collect2=yes
  870.         header_files=math-68881.h
  871.         ;;
  872.     m68000-att-sysv*)
  873.         cpu_type=m68k
  874.         xm_file=m68k/xm-3b1.h
  875.         if [ x$gas = xyes ]
  876.         then
  877.             tm_file=m68k/3b1g.h
  878.         else
  879.             tm_file=m68k/3b1.h
  880.         fi
  881.         use_collect2=yes
  882.         header_files=math-68881.h
  883.         ;;
  884.     m68k-*-lynxos)
  885.         tm_file=m68k/lynx.h
  886.         xm_file=xm-lynx.h
  887.         xmake_file=x-lynx
  888.         # ??? Due to bugs in /bin/sh, it is too much trouble to get
  889.         # the fixincludes script to run correctly, so just don't do it.
  890.         # There are only a very few very minor things that need fixing
  891.         # anyways.  Also, a number of headers files do not have final
  892.         # newlines, which causes them to be incorrectly editted by sed.
  893.         fixincludes=Makefile.in
  894.         header_files=math-68881.h
  895.         ;;
  896.     m68000-convergent-sysv*)
  897.         cpu_type=m68k
  898.         xm_file=m68k/xm-3b1.h
  899.         tm_file=m68k/ctix.h
  900.         use_collect2=yes
  901.         header_files=math-68881.h
  902.         ;;
  903.     ns32k-sequent-bsd*)
  904.         tm_file=ns32k/sequent.h
  905.         use_collect2=yes
  906.         ;;
  907.     ns32k-encore-bsd*)
  908.         tm_file=ns32k/encore.h
  909.         use_collect2=yes
  910.         ;;
  911. # This has not been updated to GCC 2.
  912. #    ns32k-ns-genix*)
  913. #        xm_file=ns32k/xm-genix.h
  914. #        xmake_file=ns32k/x-genix
  915. #        tm_file=ns32k/genix.h
  916. #        broken_install=yes
  917. #        use_collect2=yes
  918. #        ;;
  919.     ns32k-merlin-*)
  920.         tm_file=ns32k/merlin.h
  921.         use_collect2=yes
  922.         ;;
  923.     ns32k-tek6100-bsd*)
  924.         tm_file=ns32k/tek6100.h
  925.         broken_install=yes
  926.         use_collect2=yes
  927.         ;;
  928.     ns32k-tek6200-bsd*)
  929.         tm_file=ns32k/tek6200.h
  930.         broken_install=yes
  931.         use_collect2=yes
  932.         ;;
  933.     ns32k-pc532-mach*)
  934.         tm_file=ns32k/pc532-mach.h
  935.         use_collect2=yes
  936.         ;;
  937.     ns32k-pc532-minix*)
  938.         tm_file=ns32k/pc532-min.h
  939.         xm_file=ns32k/xm-pc532-min.h
  940.         use_collect2=yes
  941.         ;;
  942.     m88k-*-luna*)
  943.         tm_file=m88k/luna.h
  944.         if [ x$gas = xyes ]
  945.         then
  946.           tmake_file=m88k/t-luna-gas
  947.         else
  948.           tmake_file=m88k/t-luna
  949.         fi
  950.         ;;
  951.     m88k-dg-dgux*)
  952.         tm_file=m88k/dgux.h
  953.         xmake_file=m88k/x-dgux
  954.         broken_install=yes
  955.         if [ x$gas = xyes ]
  956.         then
  957.           tmake_file=m88k/t-dgux-gas
  958.         else
  959.           tmake_file=m88k/t-dgux
  960.         fi
  961.         fixincludes=fixinc.dgux
  962.         ;;
  963.     m88k-mot*-sysv4*)    #added by kev for Motorola delta machines
  964.         tm_file=m88k/mot-sysv4.h    #added by kev
  965.         xmake_file=m88k/x-sysv4        #added by kev
  966.         tmake_file=m88k/t-sysv4        #added by kev
  967.         ;;                #added by kev
  968.     m88k-*-sysv4*)
  969.         tm_file=m88k/sysv4.h
  970.         xmake_file=m88k/x-sysv4
  971.         tmake_file=m88k/t-sysv4
  972.         ;;
  973.     m88k-dolphin-sysv3*)
  974.         tm_file=m88k/dolph.h
  975.         xm_file=m88k/xm-sysv3.h
  976.         xmake_file=m88k/x-dolph
  977.         if [ x$gas = xyes ]
  978.         then
  979.           tmake_file=m88k/t-m88k-gas
  980.         fi
  981.         ;;
  982.  
  983.     m88k-tektronix-sysv3)
  984.         tm_file=m88k/tekXD88.h
  985.         xm_file=m88k/xm-sysv3.h
  986.         xmake_file=m88k/x-tekXD88
  987.         if [ x$gas = xyes ]
  988.         then
  989.           tmake_file=m88k/t-m88k-gas
  990.         fi
  991.         ;;
  992.  
  993.     m88k-*-sysv3*)
  994.         tm_file=m88k/sysv3.h
  995.         xm_file=m88k/xm-sysv3.h
  996.         xmake_file=m88k/x-sysv3
  997.         if [ x$gas = xyes ]
  998.         then
  999.           tmake_file=m88k/t-m88k-gas
  1000.         fi
  1001.         ;;
  1002. # This hasn't been upgraded to GCC 2.
  1003. #    fx80-alliant-*)            # Alliant FX/80
  1004. #        ;;
  1005.     arm-*-riscix1.[01]*)        # Acorn RISC machine (early versions)
  1006.         tm_file=arm/riscix1-1.h
  1007.         use_collect2=yes
  1008.         ;;
  1009.     arm-*-riscix*)            # Acorn RISC machine
  1010.         if [ x$gas = xyes ]
  1011.         then
  1012.             tm_file=arm/rix-gas.h
  1013.         else
  1014.             tm_file=arm/riscix.h
  1015.         fi
  1016.         use_collect2=yes
  1017.         ;;
  1018.     arm-*-*)            # generic version
  1019.         ;;
  1020.     c1-convex-*)            # Convex C1
  1021.         cpu_type=convex
  1022.         tm_file=convex/convex1.h
  1023.         use_collect2=yes
  1024.         ;;
  1025.     c2-convex-*)            # Convex C2
  1026.         cpu_type=convex
  1027.         tm_file=convex/convex2.h
  1028.         use_collect2=yes
  1029.         ;;
  1030.     c32-convex-*)
  1031.         cpu_type=convex
  1032.         tm_file=convex/convex32.h    # Convex C32xx
  1033.         use_collect2=yes
  1034.         ;;
  1035.     c34-convex-*)
  1036.         cpu_type=convex
  1037.         tm_file=convex/convex34.h    # Convex C34xx
  1038.         use_collect2=yes
  1039.         ;;
  1040.     c38-convex-*)
  1041.         cpu_type=convex
  1042.         tm_file=convex/convex38.h    # Convex C38xx
  1043.         use_collect2=yes
  1044.         ;;
  1045.     mips-sgi-irix5*)        # SGI System V.4., IRIX 5
  1046.         tm_file=mips/iris5.h
  1047.         xm_file=mips/xm-iris5.h
  1048.         broken_install=yes
  1049.         fixincludes=Makefile.in
  1050.         xmake_file=mips/x-iris
  1051.         # mips-tfile doesn't work yet
  1052.         tmake_file=mips/t-mips-gas
  1053.         ;;
  1054.     mips-sgi-irix4loser*)        # Mostly like a MIPS.
  1055.         if [ x$stabs = xyes ]; then
  1056.             tm_file=mips/iris4gl.h
  1057.         else
  1058.             tm_file=mips/iris4loser.h
  1059.         fi
  1060.         xm_file=mips/xm-iris4.h
  1061.         broken_install=yes
  1062.         xmake_file=mips/x-iris
  1063.         if [ x$gas = xyes ]
  1064.         then
  1065.             tmake_file=mips/t-mips-gas
  1066.         else
  1067.             extra_passes="mips-tfile mips-tdump"
  1068.         fi
  1069.         if [ x$gnu_ld != xyes ]
  1070.         then
  1071.             use_collect2=yes
  1072.         fi
  1073.         ;;
  1074.     mips-sgi-irix4*)        # Mostly like a MIPS.
  1075.         if [ x$stabs = xyes ]; then
  1076.             tm_file=mips/iris4-gdb.h
  1077.         else
  1078.             tm_file=mips/iris4.h
  1079.         fi
  1080.         xm_file=mips/xm-iris4.h
  1081.         broken_install=yes
  1082.         xmake_file=mips/x-iris
  1083.         if [ x$gas = xyes ]
  1084.         then
  1085.             tmake_file=mips/t-mips-gas
  1086.         else
  1087.             extra_passes="mips-tfile mips-tdump"
  1088.         fi
  1089.         if [ x$gnu_ld != xyes ]
  1090.         then
  1091.             use_collect2=yes
  1092.         fi
  1093.         ;;
  1094.     mips-sgi-*)            # Mostly like a MIPS.
  1095.         if [ x$stabs = xyes ]; then
  1096.             tm_file=mips/iris3-gdb.h
  1097.         else
  1098.             tm_file=mips/iris3.h
  1099.         fi
  1100.         xm_file=mips/xm-iris3.h
  1101.         broken_install=yes
  1102.         xmake_file=mips/x-iris3
  1103.         if [ x$gas = xyes ]
  1104.         then
  1105.             tmake_file=mips/t-mips-gas
  1106.         else
  1107.             extra_passes="mips-tfile mips-tdump"
  1108.         fi
  1109.         if [ x$gnu_ld != xyes ]
  1110.         then
  1111.             use_collect2=yes
  1112.         fi
  1113.         ;;
  1114.     mips-*-ultrix*)        # Decstation.
  1115.         if [ x$stabs = xyes ]; then
  1116.             tm_file=mips/ultrix-gdb.h
  1117.         else
  1118.             tm_file=mips/ultrix.h
  1119.         fi
  1120.         xmake_file=mips/x-ultrix
  1121.         if [ x$gas = xyes ]
  1122.         then
  1123.             tmake_file=mips/t-mips-gas
  1124.         else
  1125.             tmake_file=mips/t-ultrix
  1126.             extra_passes="mips-tfile mips-tdump"
  1127.         fi
  1128.         if [ x$gnu_ld != xyes ]
  1129.         then
  1130.             use_collect2=yes
  1131.         fi
  1132.             ;;
  1133.     mips-dec-osfrose*)        # Decstation running OSF/1 reference port with OSF/rose.
  1134.         tm_file=mips/osfrose.h
  1135.         xmake_file=mips/x-osfrose
  1136.         tmake_file=mips/t-osfrose
  1137.         use_collect2=yes
  1138.         ;;
  1139.     mips-dec-osf*)            # Decstation running OSF/1 as shipped by DIGITAL
  1140.         if [ x$stabs = xyes ]; then
  1141.             tm_file=mips/dec-gosf1.h
  1142.         else
  1143.             tm_file=mips/dec-osf1.h
  1144.         fi
  1145.         xmake_file=mips/x-dec-osf1
  1146.         if [ x$gas = xyes ]
  1147.         then
  1148.             tmake_file=mips/t-mips-gas
  1149.         else
  1150.             tmake_file=mips/t-ultrix
  1151.             extra_passes="mips-tfile mips-tdump"
  1152.         fi
  1153.         if [ x$gnu_ld != xyes ]
  1154.         then
  1155.             use_collect2=yes
  1156.         fi
  1157.         ;;
  1158.       mips-dec-bsd*)                  # Decstation running 4.4 BSD
  1159.               tm_file=mips/dec-bsd.h
  1160.               xmake_file=
  1161.               tmake_file=
  1162.               fixincludes=
  1163.           if [ x$gas = xyes ]
  1164.           then
  1165.                tmake_file=mips/t-mips-gas
  1166.           else
  1167.             tmake_file=mips/t-ultrix
  1168.             extra_passes="mips-tfile mips-tdump"
  1169.           fi
  1170.           if [ x$gnu_ld != xyes ]
  1171.           then
  1172.             use_collect2=yes
  1173.           fi
  1174.           ;;
  1175.     mips-sony-bsd* | mips-sony-newsos*)    # Sony NEWS 3600 or risc/news.
  1176.         if [ x$stabs = xyes ]; then
  1177.             tm_file=mips/news4-gdb.h
  1178.         else
  1179.             tm_file=mips/news4.h
  1180.         fi
  1181.         if [ x$gas = xyes ]
  1182.         then
  1183.             tmake_file=mips/t-mips-gas
  1184.         else
  1185.             extra_passes="mips-tfile mips-tdump"
  1186.         fi
  1187.         if [ x$gnu_ld != xyes ]
  1188.         then
  1189.             use_collect2=yes
  1190.         fi
  1191.         xmake_file=mips/x-sony
  1192.         ;;
  1193.     mips-sony-sysv*)        # Sony NEWS 3800 with NEWSOS5.0.
  1194.                     # That is based on svr4.
  1195.         # t-svr4 is not right because this system doesn't use ELF.
  1196.         if [ x$stabs = xyes ]; then
  1197.             tm_file=mips/news5-gdb.h
  1198.         else
  1199.             tm_file=mips/news5.h
  1200.         fi
  1201.         xm_file=mips/xm-news.h
  1202.         if [ x$gas = xyes ]
  1203.         then
  1204.             tmake_file=mips/t-mips-gas
  1205.         else
  1206.             extra_passes="mips-tfile mips-tdump"
  1207.         fi
  1208.         if [ x$gnu_ld != xyes ]
  1209.         then
  1210.             use_collect2=yes
  1211.         fi
  1212.         ;;
  1213.     mips-*-riscos[56789]bsd* | mips-*-riscos[56789]-bsd*)
  1214.         if [ x$stabs = xyes ]; then    # MIPS BSD 4.3, RISC-OS 5.0
  1215.             tm_file=mips/bsd-5-gdb.h
  1216.         else
  1217.             tm_file=mips/bsd-5.h
  1218.         fi
  1219.         if [ x$gas = xyes ]
  1220.         then
  1221.             tmake_file=mips/t-bsd-gas
  1222.         else
  1223.             tmake_file=mips/t-bsd
  1224.             extra_passes="mips-tfile mips-tdump"
  1225.         fi
  1226.         if [ x$gnu_ld != xyes ]
  1227.         then
  1228.             use_collect2=yes
  1229.         fi
  1230.         fixincludes=fixinc.mips
  1231.         broken_install=yes
  1232.             ;;
  1233.     mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd* \
  1234.         | mips-*-riscos-bsd* | mips-*-riscos[1234]-bsd*)
  1235.         if [ x$stabs = xyes ]; then    # MIPS BSD 4.3, RISC-OS 4.0
  1236.             tm_file=mips/bsd-4-gdb.h
  1237.         else
  1238.             tm_file=mips/bsd-4.h
  1239.         fi
  1240.         if [ x$gas = xyes ]
  1241.         then
  1242.             tmake_file=mips/t-bsd-gas
  1243.         else
  1244.             tmake_file=mips/t-bsd
  1245.             extra_passes="mips-tfile mips-tdump"
  1246.         fi
  1247.         if [ x$gnu_ld != xyes ]
  1248.         then
  1249.             use_collect2=yes
  1250.         fi
  1251.         broken_install=yes
  1252.             ;;
  1253.     mips-*-riscos[56789]sysv4* | mips-*-riscos[56789]-sysv4*)
  1254.         if [ x$stabs = xyes ]; then    # MIPS System V.4., RISC-OS 5.0
  1255.             tm_file=mips/svr4-5-gdb.h
  1256.         else
  1257.             tm_file=mips/svr4-5.h
  1258.         fi
  1259.         xm_file=mips/xm-sysv4.h
  1260.         xmake_file=mips/x-sysv
  1261.         if [ x$gas = xyes ]
  1262.         then
  1263.             tmake_file=mips/t-svr4-gas
  1264.         else
  1265.             tmake_file=mips/t-svr4
  1266.             extra_passes="mips-tfile mips-tdump"
  1267.         fi
  1268.         if [ x$gnu_ld != xyes ]
  1269.         then
  1270.             use_collect2=yes
  1271.         fi
  1272.         fixincludes=fixinc.mips
  1273.         broken_install=yes
  1274.         ;;
  1275.     mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4* \
  1276.         | mips-*-riscos[1234]-sysv4* | mips-*-riscos-sysv4*)
  1277.         if [ x$stabs = xyes ]; then    # MIPS System V.4. RISC-OS 4.0
  1278.             tm_file=mips/svr4-4-gdb.h
  1279.         else
  1280.             tm_file=mips/svr4-4.h
  1281.         fi
  1282.         xm_file=mips/xm-sysv.h
  1283.         xmake_file=mips/x-sysv
  1284.         if [ x$gas = xyes ]
  1285.         then
  1286.             tmake_file=mips/t-svr4-gas
  1287.         else
  1288.             tmake_file=mips/t-svr4
  1289.             extra_passes="mips-tfile mips-tdump"
  1290.         fi
  1291.         if [ x$gnu_ld != xyes ]
  1292.         then
  1293.             use_collect2=yes
  1294.         fi
  1295.         broken_install=yes
  1296.         ;;
  1297.     mips-*-riscos[56789]sysv* | mips-*-riscos[56788]-sysv*)
  1298.         if [ x$stabs = xyes ]; then    # MIPS System V.3, RISC-OS 5.0
  1299.             tm_file=mips/svr3-5-gdb.h
  1300.         else
  1301.             tm_file=mips/svr3-5.h
  1302.         fi
  1303.         xm_file=mips/xm-sysv.h
  1304.         xmake_file=mips/x-sysv
  1305.         if [ x$gas = xyes ]
  1306.         then
  1307.             tmake_file=mips/t-svr3-gas
  1308.         else
  1309.             tmake_file=mips/t-svr3
  1310.             extra_passes="mips-tfile mips-tdump"
  1311.         fi
  1312.         if [ x$gnu_ld != xyes ]
  1313.         then
  1314.             use_collect2=yes
  1315.         fi
  1316.         fixincludes=fixinc.mips
  1317.         broken_install=yes
  1318.         ;;
  1319.     mips-*-sysv* | mips-*riscos*sysv*)
  1320.         if [ x$stabs = xyes ]; then    # MIPS System V.3, RISC-OS 4.0
  1321.             tm_file=mips/svr3-4-gdb.h
  1322.         else
  1323.             tm_file=mips/svr3-4.h
  1324.         fi
  1325.         xm_file=mips/xm-sysv.h
  1326.         xmake_file=mips/x-sysv
  1327.         if [ x$gas = xyes ]
  1328.         then
  1329.             tmake_file=mips/t-svr3-gas
  1330.         else
  1331.             tmake_file=mips/t-svr3
  1332.             extra_passes="mips-tfile mips-tdump"
  1333.         fi
  1334.         if [ x$gnu_ld != xyes ]
  1335.         then
  1336.             use_collect2=yes
  1337.         fi
  1338.         broken_install=yes
  1339.         ;;
  1340.     mips-*riscos[56789]*)            # Default MIPS RISC-OS 5.0.
  1341.         if [ x$stabs = xyes ]; then
  1342.             tm_file=mips/mips-5-gdb.h
  1343.         else
  1344.             tm_file=mips/mips-5.h
  1345.         fi
  1346.         if [ x$gas = xyes ]
  1347.         then
  1348.             tmake_file=mips/t-mips-gas
  1349.         else
  1350.             extra_passes="mips-tfile mips-tdump"
  1351.         fi
  1352.         if [ x$gnu_ld != xyes ]
  1353.         then
  1354.             use_collect2=yes
  1355.         fi
  1356.         fixincludes=fixinc.mips
  1357.         broken_install=yes
  1358.         ;;
  1359.     mips-*-*)                # Default MIPS RISC-OS 4.0.
  1360.         if [ x$stabs = xyes ]; then
  1361.             tm_file=mips/mips-4-gdb.h
  1362.         else
  1363.             tm_file=mips/mips.h
  1364.         fi
  1365.         if [ x$gas = xyes ]
  1366.         then
  1367.             tmake_file=mips/t-mips-gas
  1368.         else
  1369.             extra_passes="mips-tfile mips-tdump"
  1370.         fi
  1371.         if [ x$gnu_ld != xyes ]
  1372.         then
  1373.             use_collect2=yes
  1374.         fi
  1375.         ;;
  1376.     pyramid-*-*)
  1377.         cpu_type=pyr
  1378.         xmake_file=pyr/x-pyr
  1379.         use_collect2=yes
  1380.         ;;
  1381. # This hasn't been upgraded to GCC 2.
  1382. #    tron-*-*)
  1383. #        cpu_type=gmicro
  1384. #        use_collect2=yes
  1385. #        ;;
  1386.     a29k-*-bsd*)
  1387.         tm_file=a29k/unix.h
  1388.         xm_file=a29k/xm-unix.h
  1389.         xmake_file=a29k/x-unix
  1390.         use_collect2=yes
  1391.         ;;
  1392.     a29k-*-*)            # Default a29k environment.
  1393.         use_collect2=yes
  1394.         ;;
  1395.     romp-*-aos*)
  1396.         use_collect2=yes
  1397.         ;;
  1398.     romp-*-mach*)
  1399.         xmake_file=romp/x-mach
  1400.         use_collect2=yes
  1401.         ;;
  1402.     rs6000-*-mach*)
  1403.         xm_file=rs6000/xm-mach.h
  1404.         tm_file=rs6000/mach.h
  1405.         xmake_file=rs6000/x-mach
  1406.         use_collect2=yes
  1407.         ;;
  1408.     rs6000-ibm-aix3.[01]*)
  1409.         tm_file=rs6000/aix31.h
  1410.         xmake_file=rs6000/x-aix31
  1411.         use_collect2=yes
  1412.         ;;
  1413.     rs6000-ibm-aix*)
  1414.         use_collect2=yes
  1415.         ;;
  1416.     powerpc-ibm-aix*)
  1417.         cpu_type=rs6000
  1418.         tm_file=rs6000/powerpc.h
  1419.         use_collect2=yes
  1420.         ;;
  1421.     hppa1.1-*-mach*)
  1422.         cpu_type=pa
  1423.         tm_file=pa/pa1-utahmach.h
  1424.         use_collect2=yes
  1425.         ;;
  1426.     hppa1.0-*-mach*)
  1427.         cpu_type=pa
  1428.         tm_file=pa/pa-utahmach.h
  1429.         use_collect2=yes
  1430.         ;;
  1431.     hppa1.1-*-bsd*)
  1432.         cpu_type=pa
  1433.         tm_file=pa/pa1.h
  1434.         use_collect2=yes
  1435.         ;;
  1436.     hppa1.0-*-bsd*)
  1437.         cpu_type=pa
  1438.         use_collect2=yes
  1439.         ;;
  1440.     hppa1.0-*-hpux7*)
  1441.         cpu_type=pa
  1442.         xm_file=pa/xm-pahpux.h
  1443.         xmake_file=pa/x-pa-hpux
  1444.         tmake_file=t-libc-ok
  1445.         if [ x$gas = xyes ]
  1446.         then
  1447.             tm_file=pa/pa-gux7.h
  1448.         else
  1449.             tm_file=pa/pa-hpux7.h
  1450.         fi
  1451.         broken_install=yes
  1452.         install_headers_dir=install-headers-cpio
  1453.         use_collect2=yes
  1454.         ;;
  1455.     hppa1.0-*-hpux8.0[0-2]*)
  1456.         cpu_type=pa
  1457.         xm_file=pa/xm-pahpux.h
  1458.         xmake_file=pa/x-pa-hpux
  1459.         tmake_file=t-libc-ok
  1460.         if [ x$gas = xyes ]
  1461.         then
  1462.             tm_file=pa/pa-ghpux.h
  1463.         else
  1464.             tm_file=pa/pa-oldas.h
  1465.         fi
  1466.         broken_install=yes
  1467.         install_headers_dir=install-headers-cpio
  1468.         use_collect2=yes
  1469.         ;;
  1470.     hppa1.1-*-hpux8.0[0-2]*)
  1471.         cpu_type=pa
  1472.         xm_file=pa/xm-pahpux.h
  1473.         xmake_file=pa/x-pa-hpux
  1474.         tmake_file=t-libc-ok
  1475.         if [ x$gas = xyes ]
  1476.         then
  1477.             tm_file=pa/pa1-ghpux.h
  1478.         else
  1479.             tm_file=pa/pa1-oldas.h
  1480.         fi
  1481.         broken_install=yes
  1482.         install_headers_dir=install-headers-cpio
  1483.         use_collect2=yes
  1484.         ;;
  1485.     hppa1.1-*-hpux*)
  1486.         cpu_type=pa
  1487.         xm_file=pa/xm-pahpux.h
  1488.         xmake_file=pa/x-pa-hpux
  1489.         tmake_file=t-libc-ok
  1490.         if [ x$gas = xyes ]
  1491.         then
  1492.             tm_file=pa/pa1-ghpux.h
  1493.         else
  1494.             tm_file=pa/pa1-hpux.h
  1495.         fi
  1496.         broken_install=yes
  1497.         install_headers_dir=install-headers-cpio
  1498.         use_collect2=yes
  1499.         ;;
  1500.     hppa1.0-*-hpux*)
  1501.         cpu_type=pa
  1502.         xm_file=pa/xm-pahpux.h
  1503.         xmake_file=pa/x-pa-hpux
  1504.         tmake_file=t-libc-ok
  1505.         if [ x$gas = xyes ]
  1506.         then
  1507.             tm_file=pa/pa-ghpux.h
  1508.         else
  1509.             tm_file=pa/pa-hpux.h
  1510.         fi
  1511.         broken_install=yes
  1512.         install_headers_dir=install-headers-cpio
  1513.         use_collect2=yes
  1514.         ;;
  1515.     hppa1.1-*-hiux*)
  1516.         cpu_type=pa
  1517.         xm_file=pa/xm-pahiux.h
  1518.         xmake_file=pa/x-pa-hiux
  1519.         tmake_file=t-libc-ok
  1520.         if [ x$gas = xyes ]
  1521.         then
  1522.             tm_file=pa/pa1-ghiux.h
  1523.         else
  1524.             tm_file=pa/pa1-hiux.h
  1525.         fi
  1526.         broken_install=yes
  1527.         install_headers_dir=install-headers-cpio
  1528.         use_collect2=yes
  1529.         ;;
  1530.     hppa1.0-*-hiux*)
  1531.         cpu_type=pa
  1532.         xm_file=pa/xm-pahiux.h
  1533.         xmake_file=pa/x-pa-hiux
  1534.         tmake_file=t-libc-ok
  1535.         if [ x$gas = xyes ]
  1536.         then
  1537.             tm_file=pa/pa-ghiux.h
  1538.         else
  1539.             tm_file=pa/pa-hiux.h
  1540.         fi
  1541.         broken_install=yes
  1542.         install_headers_dir=install-headers-cpio
  1543.         use_collect2=yes
  1544.         ;;
  1545.     we32k-att-sysv*)
  1546.         cpu_type=we32k
  1547.         use_collect2=yes
  1548.         ;;
  1549.     h8300-*-*)
  1550.         cpu_type=h8300
  1551.         ;;
  1552.     sh-*-*)
  1553.         cpu_type=sh
  1554.         ;;
  1555.     alpha-dec-osf1.2)
  1556.         extra_passes="mips-tfile mips-tdump"
  1557.         tm_file=alpha/osf12.h
  1558.         broken_install=yes
  1559.         use_collect2=yes
  1560.         ;;
  1561.     alpha-*-osf*)
  1562.         if [ x$stabs = xyes ]
  1563.         then
  1564.             tm_file=alpha/alpha-gdb.h
  1565.         fi
  1566.         if [ x$gas != xyes ]
  1567.         then
  1568.             extra_passes="mips-tfile mips-tdump"
  1569.         fi
  1570.         broken_install=yes
  1571.         use_collect2=yes
  1572.         ;;
  1573.     i960-*-*)            # Default i960 environment.
  1574.         use_collect2=yes
  1575.         ;;
  1576.     clipper-intergraph-clix*)
  1577.         broken_install=yes
  1578.         cpu_type=clipper
  1579.         xm_file=clipper/xm-clix.h
  1580.         tm_file=clipper/clix.h
  1581.         tmake_file=clipper/t-clix
  1582.         xmake_file=clipper/x-clix
  1583.         install_headers_dir=install-headers-cpio
  1584.         ;;
  1585.     *)
  1586.         echo "Configuration $machine not supported" 1>&2
  1587.         exit 1
  1588.         ;;
  1589.     esac
  1590.  
  1591.     case $machine in
  1592.     *-*-sysv4*)
  1593.         fixincludes=fixinc.svr4
  1594.         xmake_try_sysv=x-sysv
  1595.         broken_install=yes
  1596.         install_headers_dir=install-headers-cpio
  1597.         ;;
  1598.     *-*-sysv*)
  1599.         broken_install=yes
  1600.         install_headers_dir=install-headers-cpio
  1601.         ;;
  1602.     esac
  1603.  
  1604.     # Distinguish i386 from i486.
  1605.     # Also, do not run mips-tfile on MIPS if using gas.
  1606.     case $machine in
  1607.     i486-*-*)
  1608.         target_cpu_default=2
  1609.         ;;
  1610.     mips-*-*)
  1611.         if [ x$gas = xyes ]
  1612.         then
  1613.             target_cpu_default=16
  1614.         fi
  1615.         ;;
  1616.     esac
  1617.  
  1618.     # No need for collect2 if we have the GNU linker.
  1619.     case x$gnu_ld in 
  1620.     xyes)
  1621.         use_collect2=
  1622.         ;;
  1623.     esac
  1624.  
  1625. # Default certain vars that apply to both host and target in turn.
  1626.     if [ x$cpu_type = x ]
  1627.     then cpu_type=`echo $machine | sed 's/-.*$//'`
  1628.     fi
  1629.  
  1630. # Save data on machine being used to compile GCC in build_xm_file.
  1631. # Save data on host machine in vars host_xm_file and host_xmake_file.
  1632.     if [ x$pass1done = x ]
  1633.     then
  1634.         if [ x$xm_file = x ]
  1635.         then build_xm_file=$cpu_type/xm-$cpu_type.h
  1636.         else build_xm_file=$xm_file
  1637.         fi
  1638.         pass1done=yes
  1639.     else
  1640.         if [ x$pass2done = x ]
  1641.         then
  1642.             if [ x$xm_file = x ]
  1643.             then host_xm_file=$cpu_type/xm-$cpu_type.h
  1644.             else host_xm_file=$xm_file
  1645.             fi
  1646.             if [ x$xmake_file = x ]
  1647.             then xmake_file=$cpu_type/x-$cpu_type
  1648.             fi
  1649.             host_xmake_file=$xmake_file
  1650.             host_broken_install=$broken_install
  1651.             host_install_headers_dir=$install_headers_dir
  1652.             host_truncate_target=$truncate_target
  1653.             pass2done=yes
  1654.         fi
  1655.     fi
  1656. done
  1657.  
  1658. # Default the target-machine variables that were not explicitly set.
  1659. if [ x$tm_file = x ]
  1660. then tm_file=$cpu_type/$cpu_type.h; fi
  1661.  
  1662. if [ x$header_files = x ]
  1663. then header_files=; fi
  1664.  
  1665. if [ x$xm_file = x ]
  1666. then xm_file=$cpu_type/xm-$cpu_type.h; fi
  1667.  
  1668. md_file=$cpu_type/$cpu_type.md
  1669.  
  1670. if [ x$out_file = x ]
  1671. then out_file=$cpu_type/$cpu_type.c; fi
  1672.  
  1673. if [ x$tmake_file = x ]
  1674. then tmake_file=$cpu_type/t-$cpu_type
  1675. fi
  1676.  
  1677. # Set up the list of links to be made.
  1678. # $links is the list of link names, and $files is the list of names to link to.
  1679. files="$host_xm_file $tm_file $out_file $xm_file $build_xm_file $md_file"
  1680. links="config.h tm.h aux-output.c tconfig.h hconfig.h"
  1681.  
  1682. if [ -n "${cpp_md_flags}" ] ; then
  1683.     links="$links md.pre-cpp"
  1684. else
  1685.     links="$links md"
  1686. fi
  1687.  
  1688. rm -f config.bak
  1689. if [ -f config.status ]; then mv -f config.status config.bak; fi
  1690.  
  1691. # Make the links.
  1692. while [ -n "$files" ]
  1693. do
  1694.     # set file to car of files, files to cdr of files
  1695.     set $files; file=$1; shift; files=$*
  1696.     set $links; link=$1; shift; links=$*
  1697.  
  1698.     if [ ! -r ${srcdir}/config/$file ]
  1699.     then
  1700.         echo "$progname: cannot create a link \`$link'," 1>&2
  1701.         echo "since the file \`config/$file' does not exist" 1>&2
  1702.         exit 1
  1703.     fi
  1704.  
  1705.     $remove -f $link
  1706.     # Make a symlink if possible, otherwise try a hard link
  1707.     $symbolic_link ${srcdir}/config/$file $link 2>/dev/null || $hard_link ${srcdir}/config/$file $link || $copy ${srcdir}/config/$file $link
  1708.  
  1709.     if [ ! -r $link ]
  1710.     then
  1711.         echo "$progname: unable to link \`$link' to \`${srcdir}/config/$file'" 1>&2
  1712.         exit 1
  1713.     fi
  1714.     echo "Linked \`$link' to \`${srcdir}/config/$file'"
  1715. done
  1716.  
  1717. # Truncate the target if necessary
  1718. if [ x$host_truncate_target != x ]; then
  1719.     target=`echo $target | sed -e 's/\(..............\).*/\1/'`
  1720. fi
  1721.  
  1722. # Create Makefile.tem from Makefile.in.
  1723. # Make it set VPATH if necessary so that the sources are found.
  1724. # Also change its value of srcdir.
  1725. # Also create a .gdbinit file which runs the one in srcdir
  1726. # and tells GDB to look there for source files.
  1727. case $srcdir in
  1728. .)
  1729.     rm -f Makefile.tem
  1730.     cp Makefile.in Makefile.tem
  1731.     chmod +w Makefile.tem
  1732.     ;;
  1733. *)
  1734.     rm -f Makefile.tem
  1735.     echo "VPATH = ${srcdir}" \
  1736.       | cat - ${srcdir}/Makefile.in \
  1737.       | sed "s@^srcdir = \.@srcdir = ${srcdir}@" > Makefile.tem
  1738.     rm -f .gdbinit
  1739.     echo "dir ." > .gdbinit
  1740.     echo "dir ${srcdir}" >> .gdbinit
  1741.     echo "source ${srcdir}/.gdbinit" >> .gdbinit
  1742.     ;;
  1743. esac
  1744.  
  1745. # Conditionalize the makefile for this host machine.
  1746. if [ -f ${srcdir}/config/${host_xmake_file} ]
  1747. then
  1748.     rm -f Makefile.xx
  1749.     sed -e "/####host/  r ${srcdir}/config/${host_xmake_file}" Makefile.tem > Makefile.xx
  1750.     echo "Merged ${host_xmake_file}."
  1751.     rm -f Makefile.tem
  1752.     mv Makefile.xx Makefile.tem
  1753. else
  1754. # Say in the makefile that there is no host_xmake_file,
  1755. # by using a name which (when interpreted relative to $srcdir/config)
  1756. # will duplicate another dependency: $srcdir/Makefile.in.
  1757.     host_xmake_file=../Makefile.in
  1758. fi
  1759.  
  1760. # Add a definition for INSTALL if system wants one.
  1761. # This substitutes for lots of x-* files.
  1762. if [ x$host_broken_install = x ]
  1763. then true
  1764. else
  1765.     rm -f Makefile.xx
  1766.     abssrcdir=`cd ${srcdir}; pwd`
  1767.     sed "s|^INSTALL = .*|INSTALL = ${abssrcdir}/install.sh -c|" Makefile.tem > Makefile.xx
  1768.     rm -f Makefile.tem
  1769.     mv Makefile.xx Makefile.tem
  1770. fi
  1771.  
  1772. # Set EXTRA_HEADERS according to header_files.
  1773. # This substitutes for lots of t-* files.
  1774. if [ "x$header_files" = x ]
  1775. then true
  1776. else
  1777.     rm -f Makefile.xx
  1778.     sed "s/^EXTRA_HEADERS =/EXTRA_HEADERS = $header_files/" Makefile.tem > Makefile.xx
  1779.     rm -f Makefile.tem
  1780.     mv Makefile.xx Makefile.tem
  1781. fi
  1782.  
  1783. # Set EXTRA_PASSES according to extra_passes.
  1784. # This substitutes for lots of t-* files.
  1785. if [ "x$extra_passes" = x ]
  1786. then true
  1787. else
  1788.     rm -f Makefile.xx
  1789.     sed "s/^EXTRA_PASSES =/EXTRA_PASSES = $extra_passes/" Makefile.tem > Makefile.xx
  1790.     rm -f Makefile.tem
  1791.     mv Makefile.xx Makefile.tem
  1792. fi
  1793.  
  1794. # Add a definition of USE_COLLECT2 if system wants one.
  1795. # Also tell toplev.c what to do.
  1796. # This substitutes for lots of t-* files.
  1797. if [ x$use_collect2 = x ]
  1798. then true
  1799. else
  1800.     rm -f Makefile.xx
  1801.     (echo "USE_COLLECT2 = ld"; echo "MAYBE_USE_COLLECT2 = -DUSE_COLLECT2")\
  1802.         | cat - Makefile.tem > Makefile.xx
  1803.     rm -f Makefile.tem
  1804.     mv Makefile.xx Makefile.tem
  1805. fi
  1806.  
  1807. # Add -DTARGET_CPU_DEFAULT for toplev.c if system wants one.
  1808. # This substitutes for lots of *.h files.
  1809. if [ x$target_cpu_default = x ]
  1810. then true
  1811. else
  1812.     rm -f Makefile.xx
  1813. # This used cat, but rfg@netcom.com said that ran into NFS bugs.
  1814.     sed -e "/^# Makefile for GNU C compiler./c\\
  1815. MAYBE_TARGET_DEFAULT = -DTARGET_CPU_DEFAULT=$target_cpu_default\\
  1816. \# Makefile for GNU C compiler." Makefile.tem > Makefile.xx
  1817.     rm -f Makefile.tem
  1818.     mv Makefile.xx Makefile.tem
  1819. fi
  1820.  
  1821. # Add a CPP_MD dependence if the real md file is in md.pre-cpp.
  1822. if [ -n "${cpp_md_flags}" ] ; then
  1823.     rm -f Makefile.xx
  1824.     (echo "CPP_MD = md.pre-cpp cpp" ; echo "CPP_MD_FLAGS = $cpp_md_flags" ; echo "MD_FILE = md") \
  1825.       | cat - Makefile.tem > Makefile.xx
  1826.     rm -f Makefile.tem
  1827.     mv Makefile.xx Makefile.tem
  1828. fi
  1829.  
  1830. # Conditionalize the makefile for this target machine.
  1831. if [ -f ${srcdir}/config/${tmake_file} ]
  1832. then
  1833.     rm -f Makefile.xx
  1834.     sed -e "/####target/  r ${srcdir}/config/${tmake_file}" Makefile.tem > Makefile.xx
  1835.     echo "Merged ${tmake_file}."
  1836.     rm -f Makefile.tem
  1837.     mv Makefile.xx Makefile.tem
  1838. else
  1839. # Say in the makefile that there is no tmake_file,
  1840. # by using a name which (when interpreted relative to $srcdir/config)
  1841. # will duplicate another dependency: $srcdir/Makefile.in.
  1842.     tmake_file=../Makefile.in
  1843. fi
  1844.  
  1845. # Get the version number.
  1846. version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/version.c`
  1847.  
  1848. # Remove all formfeeds, since some Makes get confused by them.
  1849. # Also arrange to give the variables `target', `host_xmake_file',
  1850. # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES'
  1851. # and `INSTALL_HEADERS_DIR' values in the Makefile from the values
  1852. # they have in this script.
  1853. rm -f Makefile.xx
  1854. sed -e "s/ //" -e "s/^target=.*$/target=${target}/" \
  1855.     -e "s|^xmake_file=.*$|xmake_file=${host_xmake_file}|" \
  1856.     -e "s|^tmake_file=.*$|tmake_file=${tmake_file}|" \
  1857.     -e "s|^version=.*$|version=${version}|" \
  1858.     -e "s|^prefix[     ]*=.*|prefix = $prefix|" \
  1859.     -e "s|^local_prefix[     ]*=.*|local_prefix = $local_prefix|" \
  1860.     -e "s|^exec_prefix[     ]*=.*|exec_prefix = $exec_prefix|" \
  1861.     -e "s|^FIXINCLUDES[     ]*=.*|FIXINCLUDES = $fixincludes|" \
  1862.     -e "s|^INSTALL_HEADERS_DIR[     ]*=.*$|INSTALL_HEADERS_DIR = ${host_install_headers_dir}|" \
  1863.     Makefile.tem > Makefile.xx
  1864. rm -f Makefile.tem
  1865. mv Makefile.xx Makefile.tem
  1866.  
  1867. # Install Makefile for real, after making final changes.
  1868. # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
  1869. # Also use all.cross instead of all.internal, and add cross-make to Makefile.
  1870. if [ x$host = x$target ]
  1871. then
  1872.     rm -f Makefile
  1873.       if [ x$host = x$build ]
  1874.     then
  1875.         mv Makefile.tem Makefile
  1876.     else
  1877. #        When build gcc with cross-compiler, we need to fix a
  1878. #        few things.
  1879.         echo "build= $build" > Makefile
  1880.         sed -e "/####build/  r ${srcdir}/build-make" Makefile.tem >> Makefile
  1881.         rm -f Makefile.tem Makefile.xx
  1882.     fi
  1883. else
  1884.     rm -f Makefile
  1885.     echo "CROSS=-DCROSS_COMPILE" > Makefile
  1886.     sed -e "/####cross/  r ${srcdir}/cross-make" Makefile.tem >> Makefile
  1887.     rm -f Makefile.tem Makefile.xx
  1888. fi
  1889.  
  1890. echo "Created \`Makefile'."
  1891.  
  1892. if [ xx${vint} != xx ]
  1893. then
  1894.     vintmsg=" (vint)"
  1895. fi
  1896.  
  1897. # Describe the chosen configuration in config.status.
  1898. # Make that file a shellscript which will reestablish the same configuration.
  1899. echo "#!/bin/sh
  1900. # GCC was configured as follows:
  1901. ${srcdir}/configure" $arguments > config.new
  1902. echo echo host=$canon_host target=$canon_target build=$canon_build >> config.new
  1903. chmod a+x config.new
  1904. if [ -f config.bak ] && cmp config.bak config.new >/dev/null 2>/dev/null;
  1905. then
  1906.     mv -f config.bak config.status
  1907.     rm -f config.new
  1908. else
  1909.     mv -f config.new config.status
  1910.     rm -f config.bak
  1911. fi
  1912.  
  1913. if [ x$canon_host = x$canon_target ]
  1914. then
  1915.     echo "Links are now set up for target $canon_target."
  1916. else
  1917.     echo "Links are now set up for host $canon_host and target $canon_target."
  1918. fi
  1919.  
  1920. exit 0
  1921.